<?php
/**
 * Created by PhpStorm.
 * User: lenovo
 * Date: 2018/10/20
 * Time: 16:22
 */
header("content-type:text/html;charset=utf-8");

class message
{
static public function success($message='',$data=array()){
    $back = array(
        'code' => 200,
        'message' => $message,
        'data' => $data
    );
    return json_encode($back);
}
static public function fail($message='',$data=array()){
    $back = array(
        'code' => 100,
        'message' => $message,
        'data' => $data
    );
    return json_encode($back);
}
}